Return to doc.sitecore.com

  Handling Client Events
Prev Next

Similar to server events, in Sitecore V5 client events evolved into a unified message system. Those who used messages in Sitecore V4 client script will feel familiar with this feature. Messages can be used both at client and server side in Sitecore V5 and are often used to communicate between two sides.   

Message handlers are set up in web.config similar to the events:

      <messages>
        […]
        
<message name="system:logout" type="Sitecore.Web.UI.Framework.Security,Sitecore.Kernel" method="OnLogout"/>
        
<message name="system:publish" type="Sitecore.Web.UI.Framework.Items,Sitecore.Kernel" method="OnPublish"/>
        
<message name="system:preview" type="Sitecore.Web.UI.Framework.Items,Sitecore.Kernel" method="OnPreview"/>
        
<message name="system:rebuildlinkdatabase" type="Sitecore.Web.UI.Framework.Dialogs,Sitecore.Kernel" method="OnRebuildLinkDatabase"/>

        <message name="dbupgrade:run" type="Sitecore.Modules.Upgrade.UI.MessageHandler,Sitecore.Upgrade" method="Run"/>

      […]

      </messages>

You can hook into the chain for any of the existing messages and also expose your own ones.  


Prev Next